<?php
class Login{
	private $id;
	private $userName;
	private $password;

	public function check(){
		$filename="C:/xampp/htdocs/librejo/trunk/WEB/users.txt";
		$fp = fopen("$filename", "r");
		$succesfull=false;
		if ($fp){
			while (!feof($fp)) {
				$line=fgets($fp);
				$info = explode('|', $line);
				if ($info[1]=$_POST['userName']&&$info[2]=$_POST['password']){
					$succesfull=true;
				}
			}
			fclose($fp);
			if($succesfull){
				echo $funcionaaaa="funcionaaaa";
			}

		}

	}

	public function get_id(){
		return $this->id;
	}
}
?>